body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f2f2f2;
}

.chat-container {
    width: 500px; /* 增大聊天框宽度 */
    height: 700px; /* 增大聊天框高度 */
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.model-selector {
    padding: 10px 15px;
    background-color: #4CAF50;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.model-selector select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    background-color: #ffffff;
    cursor: pointer;
}

.chat-box {
    padding: 20px; /* 增加聊天内容区域的内边距 */
    flex-grow: 1; /* 使聊天内容区域占据大部分空间 */
    overflow-y: auto;
    background-color: #fafafa;
    margin-bottom: 70px; /* 让聊天框下方有更多的空间，避免输入框遮挡 */
    box-sizing: border-box; /* 保证布局不被溢出 */
}

.message {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.user-message {
    align-items: flex-end;
}

.bot-message {
    align-items: flex-start;
}

.message-bubble {
    background-color: #007bff;
    color: white;
    display: inline-block;
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 75%;
    word-wrap: break-word;
}

.bot-message .message-bubble {
    background-color: #e5e5e5;
    color: black;
}

.timestamp {
    font-size: 10px;
    color: #888;
    margin-left: 5px;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #007bff;
    border-top: 3px solid transparent;
    animation: spin 1s linear infinite;
}

.model-name {
    font-size: 12px;
    color: #888;
    display: block;
    margin-top: 5px;
}

.input-container {
    display: flex;
    align-items: center; /* 垂直居中 */
    padding: 15px 20px; /* 增加输入框和按钮的内边距 */
    background-color: #fff;
    border-top: 1px solid #ddd;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
}

.input-container textarea {
    width: 80%;
    padding: 8px 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 14px; /* 增大字体大小 */
    resize: none;
    background-color: #f9f9f9;
    min-height: 50px;
    box-sizing: border-box;
}

.input-container button {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
    min-height: 40px;
    box-sizing: border-box;
    white-space: nowrap; /* 防止按钮文字换行 */
    align-self: center; /* 垂直居中 */
}

.input-container button:disabled {
    background-color: #ddd;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
